<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
    <title>LOGIN</title>
    <link rel="stylesheet" type="text/css" href="css/estilos.css"/>	
</head>
<body>
<f:view>
	<h:form>
			
		<table width="350px">
			<tr>
				<td colspan="2" class="login">
					<h:outputText value="Autenthification"/>
				</td>
			</tr>
			<tr>
				<td class="error" colspan="2">				
					<br/>
					<br/>
					<br/>	
					<h:outputText value="Login failed" rendered="#{userBean.error}"/>					
				</td>
			</tr>
			<tr>
				<td><h:outputText value="User"/></td>
				<td><h:inputText id="user" value="#{userBean.user}"/> </td>
			</tr>
			<tr>
				<td><h:outputText value="Password"/></td>
				<td><h:inputSecret id="password" value="#{userBean.password}"/> </td>
			</tr>		
			<tr>
				<td colspan="2" align="center">
					 <h:commandButton action="#{userBean.login}" value="Login"/>
				</td>
			</tr>
		</table>
		
	</h:form>
</f:view>	
</body>
</html>